/**
 * Copyright (c) 2009 Teoti Graphix, LLC See:
 *     http://tkarchitecture.teotigraphix.org
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * 
 * @author Michael Schmalle mschmalle@teotigraphix.com
 */
package org.teotigraphix.dx.event
{

import flash.events.Event;

/**
 * The base event class for the dx framework.
 * 
 * @author Michael Schmalle
 * @copyright Teoti Graphix, LLC
 * @date 04-26-08
 */
public class ToolKitEvent 
	   extends Event
{
	include "../core/Version.as"
	
	//--------------------------------------------------------------------------
	//
	//  Public Class :: Properties
	//
	//--------------------------------------------------------------------------
	
	/**
	 * Dispatched when <code>validateProperties()</code> has completed.
	 * 
	 * @eventType validatePropertiesComplete
	 */	
	public static const VALIDATE_PROPERTIES_COMPLETE:String  = 
		"validatePropertiesComplete";
		
	/**
	 * Dispatched when <code>validateSize()</code> has completed.
	 * 
	 * @eventType validateSizeComplete
	 */
	public static const VALIDATE_SIZE_COMPLETE:String  = 
		"validateSizeComplete";
	
	/**
	 * Dispatched when <code>validateDisplayList()</code> has completed.
	 * 
	 * @eventType validateDsiplayListComplete
	 */
	public static const VALIDATE_DISPLAY_LIST_COMPLETE:String  = 
		"validateDsiplayListComplete";
	
	//--------------------------------------------------------------------------
	//
	//  Public Class [ToolKitManager] :: Properties
	//
	//--------------------------------------------------------------------------
	
	/**
	 * @eventType toolKitInitialize
	 */
	public static const TOOL_KIT_INITIALIZE:String  = "toolKitInitialize";
	
	/**
	 * @eventType toolKitInitializeComplete
	 */	
	public static const TOOL_KIT_INITIALIZE_COMPLETE:String  = "toolKitInitializeComplete";
	
	/**
	 * @eventType toolKitStart
	 */
	public static const TOOL_KIT_START:String  = "toolKitStart";
	
	/**
	 * @eventType toolKitStop
	 */
	public static const TOOL_KIT_STOP:String  = "toolKitStop";
	
	/**
	 * @eventType toolKitStopComplete
	 */
	public static const TOOL_KIT_STOP_COMPLETE:String  = "toolKitStopComplete";
	
	/**
	 * @eventType toolKitStartComplete
	 */
	public static const TOOL_KIT_START_COMPLETE:String  = "toolKitStartComplete";
	
	//--------------------------------------------------------------------------
	//
	//  Public :: Properties
	//
	//--------------------------------------------------------------------------
	
	//----------------------------------
	//  data
	//----------------------------------
	
	/**
	 * Arbitrary data passed along with the event when dynamic non typed
	 * data is needed.
	 */
	public var data:*;

	//--------------------------------------------------------------------------
	//
	//  Constructor
	//
	//--------------------------------------------------------------------------

	/**
	 * Create a new <code>ToolKitEvent</code> instance.
	 * 
	 * @param type A string indicating the event type for the 
	 * current instance.
	 * @param bubbles A boolean indicating if this event bubbles in through the
	 * display list.
	 * @param cancelable A boolean indicating if this event can have default
	 * operations canceled.
	 * @param data Arbitrary data passed along with the event.
	 */
	public function ToolKitEvent(
		type:String, 
		bubbles:Boolean = false, 
		cancelable:Boolean = false, 
		data:* = null)
	{
		super(type, bubbles, cancelable);
		this.data = data;
	}
	
	//--------------------------------------------------------------------------
	//
	//  Overriden Public :: Methods
	//
	//--------------------------------------------------------------------------

	/**
	 * Creates a clone instance using the current property state of this 
	 * instance.
	 */
	override public function clone():Event
	{
		return new ToolKitEvent(type, bubbles, cancelable, data);
	}	
}
}